cap log close
clear all
import excel "../../data/raw data/Nagasaki/nagasaki_poparea.xlsx", sheet("Sheet1") firstrow
rename A district
drop if pop54==.
gen postg = log(pop54/pop45post)
gen preg = log(pop45post/pop45pre)
reg postg preg, vce(hc3)
* Testing perfect path independence
test preg=-1
* coefficient similar to Hiroshima
test preg=-0.7

* 1945 and 1954 population changes
* Figure B.2 in paper
#d;
twoway (scatter postg preg  [w=pop45pre], msymbol(circle_hollow) color(darknavy)) 
(lfit postg preg, sort color(cranberry) lwidth(thick))
(function y=-x, range(preg) color(black) lwidth(thick) lpattern(dash)),
    legend(order(2 "Fitted line" 3 "Slope of -1") row(1) size(large))
	scheme(s1color) plotregion(lwidth(none) ilwidth(none)) scale(0.7)
	xtitle("Change in Log Population Density, before and after bombing", size(5.5)) xlabel(, labsize(large))
	ytitle("Change in Log Population Density, 1945-54", size(5.5)) ylabel(-1 0 1 2 3 4, angle(horizontal) labsize(large));
	graph export "../../output/figure/Popdensity_Change_DW_Nagasaki54.pdf" , as(pdf)  replace ;
#d cr

